import request from '@/utils/request'

// 获取客户信息
export function fetchCustomInfo(params) {
  return request({
    url: '/system/zy/user/getUser',
    method: 'get',
    params
  })
}

// 获取服务项目列表
export  function fetchProjectList(params) {
  return request({
    url: '/system/item/store/appList',
    method: 'get',
    params
  })
}

// 获取项目的技师列表
export  function fetchTechnicianList(data) {
  return request({
    url: '/system/item/technician/webAppletList',///system/item/technician/appletList
    method: 'post',
    data
  })
}

// 获取附加商品列表
export  function fetchGoodsList(params) {
  return request({
    url: '/system/store/product/pullDown/list',
    method: 'get',
    params
  })
}

// 获取包间列表
export  function fetchRoomsList(params) {
  return request({
    url: '/system/store/compartment/listEmptyRoom',///system/store/compartment/appletList
    method: 'get',
    params
  })
}

// 获取优惠券列表
export  function fetchCouponList(params) {
  return request({
    url: '/system/userCoupon/listAppNetPay',
    method: 'get',
    params
  })
}

// 获取优惠券折扣信息
export  function fetchCouponDiscount(data) {
  return request({
    url: '/system/order/calculationMoney',
    method: 'post',
    data
  })
}

// 添加订单
export  function addOrder(data) {
  return request({
    url: '/system/order/tcAddPC',
    method: 'post',
    data
  })
}

// 订单支付
export  function orderPay(data) {
  return request({
    url: '/system/order/payment',
    method: 'put',
    data
  })
}

// 退单
export  function chargeBack(data) {
  return request({
    url: '/system/order/chargeback',
    method: 'put',
    data
  })
}

// 单个项目退单
export  function projectChargeBack(data) {
  return request({
    url: '/system/order/chargebackMoney/' + data.id,
    method: 'get',
    data
  })
}
//获取项目分类
export  function listTypeByStore(data) {
  return request({
    url: '/system/item/type/listTypeByStore',
    method: 'get',
    data
  })
}
//获取订单信息
export  function toPaymentOrderItemPC(data) {
  return request({
    url: '/system/order/item/toPaymentOrderItemPC',
    method: 'post',
    data:data
  })
}
//获取实付价格
export  function toGetPayOrderItemMoney(data) {
  return request({
    url: '/system/order/item/toGetPayOrderItemMoney',
    method: 'post',
    data:data
  })
}

//获取支付
export  function payOrderItemPC(data) {
  return request({
    url: '/system/order/item/payOrderItemPC',
    method: 'post',
    data:data
  })
}

